package com.lzg.okrx.adapter

import com.lzg.okrx.observable.ResultObservable
import com.lzy.okgo.adapter.AdapterParam
import com.lzy.okgo.adapter.Call
import com.lzy.okgo.adapter.CallAdapter
import com.lzy.okgo.model.Response
import com.lzy.okgo.model.Result

import io.reactivex.Observable

class ObservableResult<T> : CallAdapter<T, Observable<Result<T>>> {

    override fun adapt(call: Call<T>, param: AdapterParam): Observable<Result<T>> =
        ResultObservable(AnalysisParams.analysis(call, param))

}
